Optimal. Leaf size=49 \[ \frac {1}{2} x \left (a^2+b^2\right )-\frac {\cos ^2(c+d x) (b-a \tan (c+d x)) (a+b \tan (c+d x))}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3506, 723, 203} \[ \frac {1}{2} x \left (a^2+b^2\right )-\frac {\cos ^2(c+d x) (b-a \tan (c+d x)) (a+b \tan (c+d x))}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 723
Rule 3506
Rubi steps
\begin {align*} \int \cos ^2(c+d x) (a+b \tan (c+d x))^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {(a+x)^2}{\left (1+\frac {x^2}{b^2}\right )^2} \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=-\frac {\cos ^2(c+d x) (b-a \tan (c+d x)) (a+b \tan (c+d x))}{2 d}+\frac {\left (a^2+b^2\right ) \operatorname {Subst}\left (\int \frac {1}{1+\frac {x^2}{b^2}} \, dx,x,b \tan (c+d x)\right )}{2 b d}\\ &=\frac {1}{2} \left (a^2+b^2\right ) x-\frac {\cos ^2(c+d x) (b-a \tan (c+d x)) (a+b \tan (c+d x))}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.13, size = 52, normalized size = 1.06 \[ \frac {2 \left (a^2+b^2\right ) (c+d x)+\left (a^2-b^2\right ) \sin (2 (c+d x))-2 a b \cos (2 (c+d x))}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.57, size = 52, normalized size = 1.06 \[ -\frac {2 \, a b \cos \left (d x + c\right )^{2} - {\left (a^{2} + b^{2}\right )} d x - {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right ) \sin \left (d x + c\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 2.06, size = 245, normalized size = 5.00 \[ \frac {a^{2} d x \tan \left (d x\right )^{2} \tan \relax (c)^{2} + b^{2} d x \tan \left (d x\right )^{2} \tan \relax (c)^{2} + a^{2} d x \tan \left (d x\right )^{2} + b^{2} d x \tan \left (d x\right )^{2} + a^{2} d x \tan \relax (c)^{2} + b^{2} d x \tan \relax (c)^{2} - a b \tan \left (d x\right )^{2} \tan \relax (c)^{2} - a^{2} \tan \left (d x\right )^{2} \tan \relax (c) + b^{2} \tan \left (d x\right )^{2} \tan \relax (c) - a^{2} \tan \left (d x\right ) \tan \relax (c)^{2} + b^{2} \tan \left (d x\right ) \tan \relax (c)^{2} + a^{2} d x + b^{2} d x + a b \tan \left (d x\right )^{2} + 4 \, a b \tan \left (d x\right ) \tan \relax (c) + a b \tan \relax (c)^{2} + a^{2} \tan \left (d x\right ) - b^{2} \tan \left (d x\right ) + a^{2} \tan \relax (c) - b^{2} \tan \relax (c) - a b}{2 \, {\left (d \tan \left (d x\right )^{2} \tan \relax (c)^{2} + d \tan \left (d x\right )^{2} + d \tan \relax (c)^{2} + d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.30, size = 70, normalized size = 1.43 \[ \frac {b^{2} \left (-\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )-\left (\cos ^{2}\left (d x +c \right )\right ) a b +a^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.43, size = 55, normalized size = 1.12 \[ \frac {{\left (a^{2} + b^{2}\right )} {\left (d x + c\right )} - \frac {2 \, a b - {\left (a^{2} - b^{2}\right )} \tan \left (d x + c\right )}{\tan \left (d x + c\right )^{2} + 1}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.58, size = 50, normalized size = 1.02 \[ x\,\left (\frac {a^2}{2}+\frac {b^2}{2}\right )-\frac {{\cos \left (c+d\,x\right )}^2\,\left (a\,b-\mathrm {tan}\left (c+d\,x\right )\,\left (\frac {a^2}{2}-\frac {b^2}{2}\right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tan {\left (c + d x \right )}\right )^{2} \cos ^{2}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________